<?php

if (!defined('TYPO3_MODE')) {
	die ('Access denied.');
}

t3lib_extMgm::addPlugin(array('LLL:EXT:inquiry/Resources/Private/Language/locallang_db.xml:inquiry_box', $_EXTKEY . '_box'), 'list_type');

t3lib_extMgm::allowTableOnStandardPages('inquiry_question');
$TCA['inquiry_question'] = array (
	'ctrl' => array (
		'title'				=> 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_question.xml:question',
		'label'				=> 'question',
		'tstamp'			=> 'tstamp',
		'crdate'			=> 'crdate',
		'delete'			=> 'deleted',
		'default_sortby'	=> 'ORDER BY starttime DESC',
		'hideAtCopy'        => TRUE,
        'prependAtCopy'        => 'LLL:EXT:lang/locallang_general.xml:LGL.prependAtCopy',
        'copyAfterDuplFields' => 'sys_language_uid',
        'useColumnsForDefaultValues' => 'sys_language_uid',
        'transOrigPointerField' => 'l18n_parent',
        'transOrigDiffSourceField' => 'l18n_diffsource',
        'languageField'        => 'sys_language_uid',
		'enablecolumns'		=> array(
			'disabled' => 'hidden'
		),
		'dynamicConfigFile'	=> t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/question.php',
		'iconfile'			=> t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_inquiry_question.png',
		'searchFields'	=>	'question',
	)
);

t3lib_extMgm::allowTableOnStandardPages('inquiry_answer');
$TCA['inquiry_answer'] = array (
	'ctrl' => array (
		'title'				=> 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_answer.xml:answer',
		'label'				=> 'answer',
		'tstamp'			=> 'tstamp',
		'sortby'			=> 'sorting',
		'crdate'			=> 'crdate',
		'delete'			=> 'deleted',
		// 'default_sortby'	=> 'ORDER BY crdate',
		'enablecolumns'		=> array(
			'disabled' => 'hidden'
		),
		'dynamicConfigFile'	=> t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/answer.php',
		'iconfile'			=> t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_inquiry_answer.png',
		'searchFields'	=>	'answer',
	)
);

t3lib_extMgm::allowTableOnStandardPages('inquiry_voter');
$TCA['inquiry_voter'] = array (
	'ctrl' => array (
		'title'				=> 'LLL:EXT:inquiry/Resources/Private/Language/locallang_db_voter.xml:voter',
		'label'				=> 'user_ip',
		'tstamp'			=> 'tstamp',
		'crdate'			=> 'crdate',
		'delete'			=> 'deleted',
		'default_sortby'	=> 'ORDER BY crdate',
		'enablecolumns'		=> array(
			'disabled' => 'hidden'
		),
		'dynamicConfigFile'	=> t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/voter.php',
		'iconfile'			=> t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_inquiry_voter.png',
		'searchFields'	=>	'name,surname',
	)
);

?>